package token

const (
	ILLEGAL   = "Illegal"
	EOF       = "End of File"
	IDENT     = "Identifier" //标识符
	INT       = "Int"
	STRING    = "String"
	ASSIGN    = "=" //=
	PLUS      = "+"
	MINUS     = "-"
	BANG      = "!"
	ASTERISK  = "*"
	SLASH     = "/"
	MOD       = "%"
	LT        = "<"
	GT        = ">"
	COMMA     = ","
	SEMICOLON = ";" //;
	LPAREN    = "(" //(
	RPAREN    = ")" //)Right Parenthesis
	LBRACE    = "{" //{Left Brace
	RBRACE    = "}" //}
	EQ        = "=="
	NE        = "!="
	FUNCTION  = "Function"
	LET       = "Let"
	TRUE      = "True"
	FALSE     = "False"
	ELSE      = "Else"
	RETURN    = "Return"
	IF        = "If"
	LBRACKET  = "["
	RBRACKET  = "]"
	COLON     = ":"
)

var KeywordsType = map[string]string{
	"fn": FUNCTION, "let": LET, "true": TRUE, "false": FALSE, "else": ELSE, "return": RETURN, "if": IF,
}

type Type string

type Token struct {
	Type    Type
	Literal string //关于type和literal: Type为大写字母开头的单词或者符号字面值，而literal就是目标代码中的值
	LineNum int
}
